<!doctype html>
<html lang="en-US">
<head>
	<meta charset="UTF-8" />
	<title>Congo Documentation</title>
	<link rel="stylesheet" type="text/css" href="pagestyle.css" />
</head>
<body>
	<div class="sheet container">
		<header class="main">

			<div class="title">
				<a href="Modules_congo.html"><img src="data/congo.png"/></a>Congo Documentation
			</div>

		</header>

		<div class="row content">
			<div class="span12">
			
				
<h1>Class <span class="name">PhysicsWorld</span></h1>


	<p>Wrapper for the main physics world.
	<a href="#description"> More...</a></p>


<hr>

<table class="table scope-contents">
	
	
	
	
	

	

	
	
	
	
	

								
		<tr>
			<td class="span1 name">Globals:</td>
			<td>
				<ul class="unstyled">
					
						<li><a href='#BOX2D_PTM'>BOX2D_PTM</a> : Float</li>
					
				</ul>
			</td>
		</tr>
	

								
		<tr>
			<td class="span1 name">Fields:</td>
			<td>
				<ul class="unstyled">
					
						<li><a href='#m_positionIterations'>m_positionIterations</a> : Int</li>
					
						<li><a href='#m_velocityIterations'>m_velocityIterations</a> : Int</li>
					
						<li><a href='#m_world'>m_world</a> : b2World</li>
					
				</ul>
			</td>
		</tr>
	
	
								
		<tr>
			<td class="span1 name">Constructors:</td>
			<td>
				<ul class="unstyled">
					
						<li><a href='#New'>New</a> ( gravity:b2Vec2=newb2vec2( )</li>
					
				</ul>
			</td>
		</tr>
	
	
	
	
								
		<tr>
			<td class="span1 name">Methods:</td>
			<td>
				<ul class="unstyled">
					
						<li><a href='Modules_congo.physicsworld_PhysicsWorld.html#CreateDebugDraw'>CreateDebugDraw</a> : b2DebugDraw ()</li>
					
						<li><a href='Modules_congo.physicsworld_PhysicsWorld.html#GetWorld'>GetWorld</a> : b2World ()</li>
					
						<li><a href='Modules_congo.physicsworld_PhysicsWorld.html#Update'>Update</a> : Void ( dTf:Float )</li>
					
				</ul>
			</td>
		</tr>
	

	
	
	
	
	
	
	
	
</table>


	<a name="description"></a>
	<h2>Detailed Discussion</h2>
	Wrapper for the main physics world. Requires box2d module.
<p>
Dev note: we used basic variable-rate timestep integration here - we should add a fixed rate option, which is more reliable 
since it is decoupled from our main framerate target.
<p>
Todo: add some functions For creating basic shapes (Factory?).
	
	
	<hr>



	<h2>Field Documentation</h2>
	<div class="scope-members-list">
		
			<div class="item">
				<a name='m_positionIterations'></a>
				<div class="well well-small name"><b>Field m_positionIterations : Int</b></div>
				<div class="description">
					<p>	Simulation parameters - change as required (refer to the the box2d docs).</p>
					
					
				</div>
			</div>
		
			<div class="item">
				<a name='m_velocityIterations'></a>
				<div class="well well-small name"><b>Field m_velocityIterations : Int</b></div>
				<div class="description">
					<p>	Simulation parameters - change as required (refer to the the box2d docs).</p>
					
					
				</div>
			</div>
		
			<div class="item">
				<a name='m_world'></a>
				<div class="well well-small name"><b>Field m_world : b2World</b></div>
				<div class="description">
					<p>	The actual b2World object.</p>
					
					
				</div>
			</div>
		
	</div>
	<hr>



	<h2>Global Documentation</h2>
	<div class="scope-members-list">
		
			<div class="item">
				<a name='BOX2D_PTM'></a>
				<div class="well well-small name"><b>Global BOX2D_PTM : Float</b></div>
				<div class="description">
					<p>	Box2d pixels-to-meters ratio.</p>
					
					
				</div>
			</div>
		
	</div>
	<hr>


						
	<h2>Constructor Documentation</h2>
	<div class="scope-members-list">
		
			<div class="item">
				<a name='New'></a>
				<div class="well well-small name"><b>Method New ( gravity:b2Vec2=newb2vec2( )</b></div>
				<div class="description">
					<p>	Constr, with gravity vector parameter.</p>
					
					
				</div>
			</div>
		
	</div>
	<hr>




						
	<h2>Method Documentation</h2>
	<div class="scope-members-list">
		
			<div class="item">
				<a name='CreateDebugDraw'></a>
				<div class="well well-small name"><b>Method CreateDebugDraw : b2DebugDraw ()</b></div>
				<div class="description">
					<p>	Call this function to initialise a 'debug draw' view to help with debugging the box2d shapes etc.
	Remember To draw it from your layer (after autofit And cls, but before other mojo graphics calls).</p>
					
					
				</div>
			</div>
		
			<div class="item">
				<a name='GetWorld'></a>
				<div class="well well-small name"><b>Method GetWorld : b2World ()</b></div>
				<div class="description">
					<p>	Retunrns the box2d b2World.</p>
					
					
				</div>
			</div>
		
			<div class="item">
				<a name='Update'></a>
				<div class="well well-small name"><b>Method Update : Void ( dTf:Float )</b></div>
				<div class="description">
					<p>	Updates the physics world using the current simulation parameters.</p>
					
					
				</div>
			</div>
		
	</div>
	<hr>




				
			</div>
		</div>
	</div>
</body>
</html>